package com.kk.miaosha.controller;

import com.kk.miaosha.Vo.IksQuery;
import com.kk.miaosha.exception.R;
import com.kk.miaosha.service.ItemKillSuccessService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * @author : K k
 * @date : 16:55 2020/10/28
 */
@RestController
@Slf4j
@RequestMapping("order")
@Api(value = "IksController",description = "订单接口")
public class IksController {
    @Autowired
    private ItemKillSuccessService iksService;

    @PostMapping("/getIksList")
    public R getIksList(@RequestBody IksQuery iksQuery){
        int page=(iksQuery.getPage()-1)*iksQuery.getLimit();
        iksQuery.setPage(page);
        HashMap<String,Object> map=iksService.getIksList(iksQuery);
        return R.ok().data(map);
    }
}
